home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / g / gnu_c / info.lzh / INFO / GCC_INFO.15 < prev    next >
Encoding:
GNU Info File  |  1993-10-21  |  48.6 KB  |  1,175 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.54 from the input
  2. file gcc.texi.
  3.  
  4.    This file documents the use and the internals of the GNU compiler.
  5.  
  6.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  7.  
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.  
  12.    Permission is granted to copy and distribute modified versions of
  13. this manual under the conditions for verbatim copying, provided also
  14. that the sections entitled "GNU General Public License" and "Protect
  15. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  16. original, and provided that the entire resulting derived work is
  17. distributed under the terms of a permission notice identical to this
  18. one.
  19.  
  20.    Permission is granted to copy and distribute translations of this
  21. manual into another language, under the above conditions for modified
  22. versions, except that the sections entitled "GNU General Public
  23. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  24. permission notice, may be included in translations approved by the Free
  25. Software Foundation instead of in the original English.
  26.  
  27. File: gcc.info,  Node: Driver,  Next: Run-time Target,  Up: Target Macros
  28.  
  29. Controlling the Compilation Driver, `gcc'
  30. =========================================
  31.  
  32. `SWITCH_TAKES_ARG (CHAR)'
  33.      A C expression which determines whether the option `-CHAR' takes
  34.      arguments.  The value should be the number of arguments that
  35.      option takes-zero, for many options.
  36.  
  37.      By default, this macro is defined to handle the standard options
  38.      properly.  You need not define it unless you wish to add additional
  39.      options which take arguments.
  40.  
  41. `WORD_SWITCH_TAKES_ARG (NAME)'
  42.      A C expression which determines whether the option `-NAME' takes
  43.      arguments.  The value should be the number of arguments that
  44.      option takes-zero, for many options.  This macro rather than
  45.      `SWITCH_TAKES_ARG' is used for multi-character option names.
  46.  
  47.      By default, this macro is defined as
  48.      `DEFAULT_WORD_SWITCH_TAKES_ARG', which handles the standard options
  49.      properly.  You need not define `WORD_SWITCH_TAKES_ARG' unless you
  50.      wish to add additional options which take arguments.  Any
  51.      redefinition should call `DEFAULT_WORD_SWITCH_TAKES_ARG' and then
  52.      check for additional options.
  53.  
  54. `SWITCHES_NEED_SPACES'
  55.      A string-valued C expression which is nonempty if the linker needs
  56.      a space between the `-L' or `-o' option and its argument.
  57.  
  58.      If this macro is not defined, the default value is 0.
  59.  
  60. `CPP_SPEC'
  61.      A C string constant that tells the GNU CC driver program options to
  62.      pass to CPP.  It can also specify how to translate options you
  63.      give to GNU CC into options for GNU CC to pass to the CPP.
  64.  
  65.      Do not define this macro if it does not need to do anything.
  66.  
  67. `NO_BUILTIN_SIZE_TYPE'
  68.      If this macro is defined, the preprocessor will not define the
  69.      builtin macro `__SIZE_TYPE__'.  The macro `__SIZE_TYPE__' must
  70.      then be defined by `CPP_SPEC' instead.
  71.  
  72.      This should be defined if `SIZE_TYPE' depends on target dependent
  73.      flags which are not accessible to the preprocessor.  Otherwise, it
  74.      should not be defined.
  75.  
  76. `NO_BUILTIN_PTRDIFF_TYPE'
  77.      If this macro is defined, the preprocessor will not define the
  78.      builtin macro `__PTRDIFF_TYPE__'.  The macro `__PTRDIFF_TYPE__'
  79.      must then be defined by `CPP_SPEC' instead.
  80.  
  81.      This should be defined if `PTRDIFF_TYPE' depends on target
  82.      dependent flags which are not accessible to the preprocessor.
  83.      Otherwise, it should not be defined.
  84.  
  85. `SIGNED_CHAR_SPEC'
  86.      A C string constant that tells the GNU CC driver program options to
  87.      pass to CPP.  By default, this macro is defined to pass the option
  88.      `-D__CHAR_UNSIGNED__' to CPP if `char' will be treated as
  89.      `unsigned char' by `cc1'.
  90.  
  91.      Do not define this macro unless you need to override the default
  92.      definition.
  93.  
  94. `CC1_SPEC'
  95.      A C string constant that tells the GNU CC driver program options to
  96.      pass to `cc1'.  It can also specify how to translate options you
  97.      give to GNU CC into options for GNU CC to pass to the `cc1'.
  98.  
  99.      Do not define this macro if it does not need to do anything.
  100.  
  101. `CC1PLUS_SPEC'
  102.      A C string constant that tells the GNU CC driver program options to
  103.      pass to `cc1plus'.  It can also specify how to translate options
  104.      you give to GNU CC into options for GNU CC to pass to the
  105.      `cc1plus'.
  106.  
  107.      Do not define this macro if it does not need to do anything.
  108.  
  109. `ASM_SPEC'
  110.      A C string constant that tells the GNU CC driver program options to
  111.      pass to the assembler.  It can also specify how to translate
  112.      options you give to GNU CC into options for GNU CC to pass to the
  113.      assembler.  See the file `sun3.h' for an example of this.
  114.  
  115.      Do not define this macro if it does not need to do anything.
  116.  
  117. `ASM_FINAL_SPEC'
  118.      A C string constant that tells the GNU CC driver program how to
  119.      run any programs which cleanup after the normal assembler.
  120.      Normally, this is not needed.  See the file `mips.h' for an
  121.      example of this.
  122.  
  123.      Do not define this macro if it does not need to do anything.
  124.  
  125. `LINK_SPEC'
  126.      A C string constant that tells the GNU CC driver program options to
  127.      pass to the linker.  It can also specify how to translate options
  128.      you give to GNU CC into options for GNU CC to pass to the linker.
  129.  
  130.      Do not define this macro if it does not need to do anything.
  131.  
  132. `LIB_SPEC'
  133.      Another C string constant used much like `LINK_SPEC'.  The
  134.      difference between the two is that `LIB_SPEC' is used at the end
  135.      of the command given to the linker.
  136.  
  137.      If this macro is not defined, a default is provided that loads the
  138.      standard C library from the usual place.  See `gcc.c'.
  139.  
  140. `STARTFILE_SPEC'
  141.      Another C string constant used much like `LINK_SPEC'.  The
  142.      difference between the two is that `STARTFILE_SPEC' is used at the
  143.      very beginning of the command given to the linker.
  144.  
  145.      If this macro is not defined, a default is provided that loads the
  146.      standard C startup file from the usual place.  See `gcc.c'.
  147.  
  148. `ENDFILE_SPEC'
  149.      Another C string constant used much like `LINK_SPEC'.  The
  150.      difference between the two is that `ENDFILE_SPEC' is used at the
  151.      very end of the command given to the linker.
  152.  
  153.      Do not define this macro if it does not need to do anything.
  154.  
  155. `LINK_LIBGCC_SPECIAL'
  156.      Define this macro meaning that `gcc' should find the library
  157.      `libgcc.a' by hand, rather than passing the argument `-lgcc' to
  158.      tell the linker to do the search; also, `gcc' should not generate
  159.      `-L' options to pass to the linker (as it normally does).
  160.  
  161. `LINK_LIBGCC_SPECIAL_1'
  162.      Define this macro meaning that `gcc' should find the library
  163.      `libgcc.a' by hand, rather than passing the argument `-lgcc' to
  164.      tell the linker to do the search.
  165.  
  166. `RELATIVE_PREFIX_NOT_LINKDIR'
  167.      Define this macro to tell `gcc' that it should only translate a
  168.      `-B' prefix into a `-L' linker option if the prefix indicates an
  169.      absolute file name.
  170.  
  171. `STANDARD_EXEC_PREFIX'
  172.      Define this macro as a C string constant if you wish to override
  173.      the standard choice of `/usr/local/lib/gcc-lib/' as the default
  174.      prefix to try when searching for the executable files of the
  175.      compiler.
  176.  
  177. `MD_EXEC_PREFIX'
  178.      If defined, this macro is an additional prefix to try after
  179.      `STANDARD_EXEC_PREFIX'.  `MD_EXEC_PREFIX' is not searched when the
  180.      `-b' option is used, or the compiler is built as a cross compiler.
  181.  
  182. `STANDARD_STARTFILE_PREFIX'
  183.      Define this macro as a C string constant if you wish to override
  184.      the standard choice of `/usr/local/lib/' as the default prefix to
  185.      try when searching for startup files such as `crt0.o'.
  186.  
  187. `MD_STARTFILE_PREFIX'
  188.      If defined, this macro supplies an additional prefix to try after
  189.      the standard prefixes.  `MD_EXEC_PREFIX' is not searched when the
  190.      `-b' option is used, or when the compiler is built as a cross
  191.      compiler.
  192.  
  193. `MD_STARTFILE_PREFIX_1'
  194.      If defined, this macro supplies yet another prefix to try after the
  195.      standard prefixes.  It is not searched when the `-b' option is
  196.      used, or when the compiler is built as a cross compiler.
  197.  
  198. `LOCAL_INCLUDE_DIR'
  199.      Define this macro as a C string constant if you wish to override
  200.      the standard choice of `/usr/local/include' as the default prefix
  201.      to try when searching for local header files.  `LOCAL_INCLUDE_DIR'
  202.      comes before `SYSTEM_INCLUDE_DIR' in the search order.
  203.  
  204.      Cross compilers do not use this macro and do not search either
  205.      `/usr/local/include' or its replacement.
  206.  
  207. `SYSTEM_INCLUDE_DIR'
  208.      Define this macro as a C string constant if you wish to specify a
  209.      system-specific directory to search for header files before the
  210.      standard directory.  `SYSTEM_INCLUDE_DIR' comes before
  211.      `STANDARD_INCLUDE_DIR' in the search order.
  212.  
  213.      Cross compilers do not use this macro and do not search the
  214.      directory specified.
  215.  
  216. `STANDARD_INCLUDE_DIR'
  217.      Define this macro as a C string constant if you wish to override
  218.      the standard choice of `/usr/include' as the default prefix to try
  219.      when searching for header files.
  220.  
  221.      Cross compilers do not use this macro and do not search either
  222.      `/usr/include' or its replacement.
  223.  
  224. `INCLUDE_DEFAULTS'
  225.      Define this macro if you wish to override the entire default
  226.      search path for include files.  The default search path includes
  227.      `GCC_INCLUDE_DIR', `LOCAL_INCLUDE_DIR', `SYSTEM_INCLUDE_DIR',
  228.      `GPLUSPLUS_INCLUDE_DIR', and `STANDARD_INCLUDE_DIR'.  In addition,
  229.      `GPLUSPLUS_INCLUDE_DIR' and `GCC_INCLUDE_DIR' are defined
  230.      automatically by `Makefile', and specify private search areas for
  231.      GCC.  The directory `GPLUSPLUS_INCLUDE_DIR' is used only for C++
  232.      programs.
  233.  
  234.      The definition should be an initializer for an array of structures.
  235.      Each array element should have two elements: the directory name (a
  236.      string constant) and a flag for C++-only directories.  Mark the
  237.      end of the array with a null element.  For example, here is the
  238.      definition used for VMS:
  239.  
  240.           #define INCLUDE_DEFAULTS \
  241.           {                                       \
  242.             { "GNU_GXX_INCLUDE:", 1},             \
  243.             { "GNU_CC_INCLUDE:", 0},              \
  244.             { "SYS$SYSROOT:[SYSLIB.]", 0},        \
  245.             { ".", 0},                            \
  246.             { 0, 0}                               \
  247.           }
  248.  
  249.    Here is the order of prefixes tried for exec files:
  250.  
  251.   1. Any prefixes specified by the user with `-B'.
  252.  
  253.   2. The environment variable `GCC_EXEC_PREFIX', if any.
  254.  
  255.   3. The directories specified by the environment variable
  256.      `COMPILER_PATH'.
  257.  
  258.   4. The macro `STANDARD_EXEC_PREFIX'.
  259.  
  260.   5. `/usr/lib/gcc/'.
  261.  
  262.   6. The macro `MD_EXEC_PREFIX', if any.
  263.  
  264.    Here is the order of prefixes tried for startfiles:
  265.  
  266.   1. Any prefixes specified by the user with `-B'.
  267.  
  268.   2. The environment variable `GCC_EXEC_PREFIX', if any.
  269.  
  270.   3. The directories specified by the environment variable
  271.      `LIBRARY_PATH'.
  272.  
  273.   4. The macro `STANDARD_EXEC_PREFIX'.
  274.  
  275.   5. `/usr/lib/gcc/'.
  276.  
  277.   6. The macro `MD_EXEC_PREFIX', if any.
  278.  
  279.   7. The macro `MD_STARTFILE_PREFIX', if any.
  280.  
  281.   8. The macro `STANDARD_STARTFILE_PREFIX'.
  282.  
  283.   9. `/lib/'.
  284.  
  285.  10. `/usr/lib/'.
  286.  
  287. File: gcc.info,  Node: Run-time Target,  Next: Storage Layout,  Prev: Driver,  Up: Target Macros
  288.  
  289. Run-time Target Specification
  290. =============================
  291.  
  292. `CPP_PREDEFINES'
  293.      Define this to be a string constant containing `-D' options to
  294.      define the predefined macros that identify this machine and system.
  295.      These macros will be predefined unless the `-ansi' option is
  296.      specified.
  297.  
  298.      In addition, a parallel set of macros are predefined, whose names
  299.      are made by appending `__' at the beginning and at the end.  These
  300.      `__' macros are permitted by the ANSI standard, so they are
  301.      predefined regardless of whether `-ansi' is specified.
  302.  
  303.      For example, on the Sun, one can use the following value:
  304.  
  305.           "-Dmc68000 -Dsun -Dunix"
  306.  
  307.      The result is to define the macros `__mc68000__', `__sun__' and
  308.      `__unix__' unconditionally, and the macros `mc68000', `sun' and
  309.      `unix' provided `-ansi' is not specified.
  310.  
  311. `STDC_VALUE'
  312.      Define the value to be assigned to the built-in macro `__STDC__'.
  313.      The default is the value `1'.
  314.  
  315. `extern int target_flags;'
  316.      This declaration should be present.
  317.  
  318. `TARGET_...'
  319.      This series of macros is to allow compiler command arguments to
  320.      enable or disable the use of optional features of the target
  321.      machine.  For example, one machine description serves both the
  322.      68000 and the 68020; a command argument tells the compiler whether
  323.      it should use 68020-only instructions or not.  This command
  324.      argument works by means of a macro `TARGET_68020' that tests a bit
  325.      in `target_flags'.
  326.  
  327.      Define a macro `TARGET_FEATURENAME' for each such option.  Its
  328.      definition should test a bit in `target_flags'; for example:
  329.  
  330.           #define TARGET_68020 (target_flags & 1)
  331.  
  332.      One place where these macros are used is in the
  333.      condition-expressions of instruction patterns.  Note how
  334.      `TARGET_68020' appears frequently in the 68000 machine description
  335.      file, `m68k.md'.  Another place they are used is in the
  336.      definitions of the other macros in the `MACHINE.h' file.
  337.  
  338. `TARGET_SWITCHES'
  339.      This macro defines names of command options to set and clear bits
  340.      in `target_flags'.  Its definition is an initializer with a
  341.      subgrouping for each command option.
  342.  
  343.      Each subgrouping contains a string constant, that defines the
  344.      option name, and a number, which contains the bits to set in
  345.      `target_flags'.  A negative number says to clear bits instead; the
  346.      negative of the number is which bits to clear.  The actual option
  347.      name is made by appending `-m' to the specified name.
  348.  
  349.      One of the subgroupings should have a null string.  The number in
  350.      this grouping is the default value for `target_flags'.  Any target
  351.      options act starting with that value.
  352.  
  353.      Here is an example which defines `-m68000' and `-m68020' with
  354.      opposite meanings, and picks the latter as the default:
  355.  
  356.           #define TARGET_SWITCHES \
  357.             { { "68020", 1},      \
  358.               { "68000", -1},     \
  359.               { "", 1}}
  360.  
  361. `TARGET_OPTIONS'
  362.      This macro is similar to `TARGET_SWITCHES' but defines names of
  363.      command options that have values.  Its definition is an
  364.      initializer with a subgrouping for each command option.
  365.  
  366.      Each subgrouping contains a string constant, that defines the
  367.      fixed part of the option name, and the address of a variable.  The
  368.      variable, type `char *', is set to the variable part of the given
  369.      option if the fixed part matches.  The actual option name is made
  370.      by appending `-m' to the specified name.
  371.  
  372.      Here is an example which defines `-mshort-data-NUMBER'.  If the
  373.      given option is `-mshort-data-512', the variable `m88k_short_data'
  374.      will be set to the string `"512"'.
  375.  
  376.           extern char *m88k_short_data;
  377.           #define TARGET_OPTIONS { { "short-data-", &m88k_short_data } }
  378.  
  379. `TARGET_VERSION'
  380.      This macro is a C statement to print on `stderr' a string
  381.      describing the particular machine description choice.  Every
  382.      machine description should define `TARGET_VERSION'.  For example:
  383.  
  384.           #ifdef MOTOROLA
  385.           #define TARGET_VERSION \
  386.             fprintf (stderr, " (68k, Motorola syntax)");
  387.           #else
  388.           #define TARGET_VERSION \
  389.             fprintf (stderr, " (68k, MIT syntax)");
  390.           #endif
  391.  
  392. `OVERRIDE_OPTIONS'
  393.      Sometimes certain combinations of command options do not make
  394.      sense on a particular target machine.  You can define a macro
  395.      `OVERRIDE_OPTIONS' to take account of this.  This macro, if
  396.      defined, is executed once just after all the command options have
  397.      been parsed.
  398.  
  399.      Don't use this macro to turn on various extra optimizations for
  400.      `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.
  401.  
  402. `OPTIMIZATION_OPTIONS (LEVEL)'
  403.      Some machines may desire to change what optimizations are
  404.      performed for various optimization levels.   This macro, if
  405.      defined, is executed once just after the optimization level is
  406.      determined and before the remainder of the command options have
  407.      been parsed.  Values set in this macro are used as the default
  408.      values for the other command line options.
  409.  
  410.      LEVEL is the optimization level specified; 2 if -O2 is specified,
  411.      1 if -O is specified, and 0 if neither is specified.
  412.  
  413.      *Do not examine `write_symbols' in this macro!* The debugging
  414.      options are not supposed to alter the generated code.
  415.  
  416. File: gcc.info,  Node: Storage Layout,  Next: Type Layout,  Prev: Run-time Target,  Up: Target Macros
  417.  
  418. Storage Layout
  419. ==============
  420.  
  421.    Note that the definitions of the macros in this table which are
  422. sizes or alignments measured in bits do not need to be constant.  They
  423. can be C expressions that refer to static variables, such as the
  424. `target_flags'.  *Note Run-time Target::.
  425.  
  426. `BITS_BIG_ENDIAN'
  427.      Define this macro to be the value 1 if the most significant bit in
  428.      a byte has the lowest number; otherwise define it to be the value
  429.      zero.  This means that bit-field instructions count from the most
  430.      significant bit.  If the machine has no bit-field instructions,
  431.      then this must still be defined, but it doesn't matter which value
  432.      it is defined to.
  433.  
  434.      This macro does not affect the way structure fields are packed into
  435.      bytes or words; that is controlled by `BYTES_BIG_ENDIAN'.
  436.  
  437. `BYTES_BIG_ENDIAN'
  438.      Define this macro to be 1 if the most significant byte in a word
  439.      has the lowest number.
  440.  
  441. `WORDS_BIG_ENDIAN'
  442.      Define this macro to be 1 if, in a multiword object, the most
  443.      significant word has the lowest number.  This applies to both
  444.      memory locations and registers; GNU CC fundamentally assumes that
  445.      the order of words in memory is the same as the order in registers.
  446.  
  447. `BITS_PER_UNIT'
  448.      Define this macro to be the number of bits in an addressable
  449.      storage unit (byte); normally 8.
  450.  
  451. `BITS_PER_WORD'
  452.      Number of bits in a word; normally 32.
  453.  
  454. `MAX_BITS_PER_WORD'
  455.      Maximum number of bits in a word.  If this is undefined, the
  456.      default is `BITS_PER_WORD'.  Otherwise, it is the constant value
  457.      that is the largest value that `BITS_PER_WORD' can have at
  458.      run-time.
  459.  
  460. `UNITS_PER_WORD'
  461.      Number of storage units in a word; normally 4.
  462.  
  463. `POINTER_SIZE'
  464.      Width of a pointer, in bits.
  465.  
  466. `PROMOTE_MODE (M, UNSIGNEDP, TYPE)'
  467.      A macro to update M and UNSIGNEDP when an object whose type is
  468.      TYPE and which has the specified mode and signedness is to be
  469.      stored in a register.  This macro is only called when TYPE is a
  470.      scalar type.
  471.  
  472.      On most RISC machines, which only have operations that operate on
  473.      a full register, define this macro to set M to `word_mode' if M is
  474.      an integer mode narrower than `BITS_PER_WORD'.  In most cases,
  475.      only integer modes should be widened because wider-precision
  476.      floating-point operations are usually more expensive than their
  477.      narrower counterparts.
  478.  
  479.      For most machines, the macro definition does not change UNSIGNEDP.
  480.      However, some machines, have instructions that preferentially
  481.      handle either signed or unsigned quantities of certain modes.  For
  482.      example, on the DEC Alpha, 32-bit loads from memory and 32-bit add
  483.      instructions sign-extend the result to 64 bits.  On such machines,
  484.      set UNSIGNEDP according to which kind of extension is more
  485.      efficient.
  486.  
  487.      Do not define this macro if it would never modify M.
  488.  
  489. `PROMOTE_FUNCTION_ARGS'
  490.      Define this macro if the promotion described by `PROMOTE_MODE'
  491.      should also be done for outgoing function arguments.
  492.  
  493. `PROMOTE_FUNCTION_RETURN'
  494.      Define this macro if the promotion described by `PROMOTE_MODE'
  495.      should also be done for the return value of functions.
  496.  
  497.      If this macro is defined, `FUNCTION_VALUE' must perform the same
  498.      promotions done by `PROMOTE_MODE'.
  499.  
  500. `PARM_BOUNDARY'
  501.      Normal alignment required for function parameters on the stack, in
  502.      bits.  All stack parameters receive at least this much alignment
  503.      regardless of data type.  On most machines, this is the same as the
  504.      size of an integer.
  505.  
  506. `STACK_BOUNDARY'
  507.      Define this macro if you wish to preserve a certain alignment for
  508.      the stack pointer.  The definition is a C expression for the
  509.      desired alignment (measured in bits).
  510.  
  511.      If `PUSH_ROUNDING' is not defined, the stack will always be aligned
  512.      to the specified boundary.  If `PUSH_ROUNDING' is defined and
  513.      specifies a less strict alignment than `STACK_BOUNDARY', the stack
  514.      may be momentarily unaligned while pushing arguments.
  515.  
  516. `FUNCTION_BOUNDARY'
  517.      Alignment required for a function entry point, in bits.
  518.  
  519. `BIGGEST_ALIGNMENT'
  520.      Biggest alignment that any data type can require on this machine,
  521.      in bits.
  522.  
  523. `BIGGEST_FIELD_ALIGNMENT'
  524.      Biggest alignment that any structure field can require on this
  525.      machine, in bits.  If defined, this overrides `BIGGEST_ALIGNMENT'
  526.      for structure fields only.
  527.  
  528. `MAX_OFILE_ALIGNMENT'
  529.      Biggest alignment supported by the object file format of this
  530.      machine.  Use this macro to limit the alignment which can be
  531.      specified using the `__attribute__ ((aligned (N)))' construct.  If
  532.      not defined, the default value is `BIGGEST_ALIGNMENT'.
  533.  
  534. `DATA_ALIGNMENT (TYPE, BASIC-ALIGN)'
  535.      If defined, a C expression to compute the alignment for a static
  536.      variable.  TYPE is the data type, and BASIC-ALIGN is the alignment
  537.      that the object would ordinarily have.  The value of this macro is
  538.      used instead of that alignment to align the object.
  539.  
  540.      If this macro is not defined, then BASIC-ALIGN is used.
  541.  
  542.      One use of this macro is to increase alignment of medium-size data
  543.      to make it all fit in fewer cache lines.  Another is to cause
  544.      character arrays to be word-aligned so that `strcpy' calls that
  545.      copy constants to character arrays can be done inline.
  546.  
  547. `CONSTANT_ALIGNMENT (CONSTANT, BASIC-ALIGN)'
  548.      If defined, a C expression to compute the alignment given to a
  549.      constant that is being placed in memory.  CONSTANT is the constant
  550.      and BASIC-ALIGN is the alignment that the object would ordinarily
  551.      have.  The value of this macro is used instead of that alignment to
  552.      align the object.
  553.  
  554.      If this macro is not defined, then BASIC-ALIGN is used.
  555.  
  556.      The typical use of this macro is to increase alignment for string
  557.      constants to be word aligned so that `strcpy' calls that copy
  558.      constants can be done inline.
  559.  
  560. `EMPTY_FIELD_BOUNDARY'
  561.      Alignment in bits to be given to a structure bit field that
  562.      follows an empty field such as `int : 0;'.
  563.  
  564.      Note that `PCC_BITFIELD_TYPE_MATTERS' also affects the alignment
  565.      that results from an empty field.
  566.  
  567. `STRUCTURE_SIZE_BOUNDARY'
  568.      Number of bits which any structure or union's size must be a
  569.      multiple of.  Each structure or union's size is rounded up to a
  570.      multiple of this.
  571.  
  572.      If you do not define this macro, the default is the same as
  573.      `BITS_PER_UNIT'.
  574.  
  575. `STRICT_ALIGNMENT'
  576.      Define this macro to be the value 1 if instructions will fail to
  577.      work if given data not on the nominal alignment.  If instructions
  578.      will merely go slower in that case, define this macro as 0.
  579.  
  580. `PCC_BITFIELD_TYPE_MATTERS'
  581.      Define this if you wish to imitate the way many other C compilers
  582.      handle alignment of bitfields and the structures that contain them.
  583.  
  584.      The behavior is that the type written for a bitfield (`int',
  585.      `short', or other integer type) imposes an alignment for the
  586.      entire structure, as if the structure really did contain an
  587.      ordinary field of that type.  In addition, the bitfield is placed
  588.      within the structure so that it would fit within such a field, not
  589.      crossing a boundary for it.
  590.  
  591.      Thus, on most machines, a bitfield whose type is written as `int'
  592.      would not cross a four-byte boundary, and would force four-byte
  593.      alignment for the whole structure.  (The alignment used may not be
  594.      four bytes; it is controlled by the other alignment parameters.)
  595.  
  596.      If the macro is defined, its definition should be a C expression;
  597.      a nonzero value for the expression enables this behavior.
  598.  
  599.      Note that if this macro is not defined, or its value is zero, some
  600.      bitfields may cross more than one alignment boundary.  The
  601.      compiler can support such references if there are `insv', `extv',
  602.      and `extzv' insns that can directly reference memory.
  603.  
  604.      The other known way of making bitfields work is to define
  605.      `STRUCTURE_SIZE_BOUNDARY' as large as `BIGGEST_ALIGNMENT'.  Then
  606.      every structure can be accessed with fullwords.
  607.  
  608.      Unless the machine has bitfield instructions or you define
  609.      `STRUCTURE_SIZE_BOUNDARY' that way, you must define
  610.      `PCC_BITFIELD_TYPE_MATTERS' to have a nonzero value.
  611.  
  612.      If your aim is to make GNU CC use the same conventions for laying
  613.      out bitfields as are used by another compiler, here is how to
  614.      investigate what the other compiler does.  Compile and run this
  615.      program:
  616.  
  617.           struct foo1
  618.           {
  619.             char x;
  620.             char :0;
  621.             char y;
  622.           };
  623.           
  624.           struct foo2
  625.           {
  626.             char x;
  627.             int :0;
  628.             char y;
  629.           };
  630.           
  631.           main ()
  632.           {
  633.             printf ("Size of foo1 is %d\n",
  634.                     sizeof (struct foo1));
  635.             printf ("Size of foo2 is %d\n",
  636.                     sizeof (struct foo2));
  637.             exit (0);
  638.           }
  639.  
  640.      If this prints 2 and 5, then the compiler's behavior is what you
  641.      would get from `PCC_BITFIELD_TYPE_MATTERS'.
  642.  
  643. `BITFIELD_NBYTES_LIMITED'
  644.      Like PCC_BITFIELD_TYPE_MATTERS except that its effect is limited to
  645.      aligning a bitfield within the structure.
  646.  
  647. `ROUND_TYPE_SIZE (STRUCT, SIZE, ALIGN)'
  648.      Define this macro as an expression for the overall size of a
  649.      structure (given by STRUCT as a tree node) when the size computed
  650.      from the fields is SIZE and the alignment is ALIGN.
  651.  
  652.      The default is to round SIZE up to a multiple of ALIGN.
  653.  
  654. `ROUND_TYPE_ALIGN (STRUCT, COMPUTED, SPECIFIED)'
  655.      Define this macro as an expression for the alignment of a structure
  656.      (given by STRUCT as a tree node) if the alignment computed in the
  657.      usual way is COMPUTED and the alignment explicitly specified was
  658.      SPECIFIED.
  659.  
  660.      The default is to use SPECIFIED if it is larger; otherwise, use
  661.      the smaller of COMPUTED and `BIGGEST_ALIGNMENT'
  662.  
  663. `MAX_FIXED_MODE_SIZE'
  664.      An integer expression for the size in bits of the largest integer
  665.      machine mode that should actually be used.  All integer machine
  666.      modes of this size or smaller can be used for structures and
  667.      unions with the appropriate sizes.  If this macro is undefined,
  668.      `GET_MODE_BITSIZE (DImode)' is assumed.
  669.  
  670. `CHECK_FLOAT_VALUE (MODE, VALUE)'
  671.      A C statement to validate the value VALUE (of type `double') for
  672.      mode MODE.  This means that you check whether VALUE fits within
  673.      the possible range of values for mode MODE on this target machine.
  674.      The mode MODE is always `SFmode' or `DFmode'.
  675.  
  676.      If VALUE is not valid, you should call `error' to print an error
  677.      message and then assign some valid value to VALUE.  Allowing an
  678.      invalid value to go through the compiler can produce incorrect
  679.      assembler code which may even cause Unix assemblers to crash.
  680.  
  681.      This macro need not be defined if there is no work for it to do.
  682.  
  683. `TARGET_FLOAT_FORMAT'
  684.      A code distinguishing the floating point format of the target
  685.      machine.  There are three defined values:
  686.  
  687.     `IEEE_FLOAT_FORMAT'
  688.           This code indicates IEEE floating point.  It is the default;
  689.           there is no need to define this macro when the format is IEEE.
  690.  
  691.     `VAX_FLOAT_FORMAT'
  692.           This code indicates the peculiar format used on the Vax.
  693.  
  694.     `UNKNOWN_FLOAT_FORMAT'
  695.           This code indicates any other format.
  696.  
  697.      The value of this macro is compared with `HOST_FLOAT_FORMAT'
  698.      (*note Config::.) to determine whether the target machine has the
  699.      same format as the host machine.  If any other formats are
  700.      actually in use on supported machines, new codes should be defined
  701.      for them.
  702.  
  703. File: gcc.info,  Node: Type Layout,  Next: Registers,  Prev: Storage Layout,  Up: Target Macros
  704.  
  705. Layout of Source Language Data Types
  706. ====================================
  707.  
  708.    These macros define the sizes and other characteristics of the
  709. standard basic data types used in programs being compiled.  Unlike the
  710. macros in the previous section, these apply to specific features of C
  711. and related languages, rather than to fundamental aspects of storage
  712. layout.
  713.  
  714. `INT_TYPE_SIZE'
  715.      A C expression for the size in bits of the type `int' on the
  716.      target machine.  If you don't define this, the default is one word.
  717.  
  718. `SHORT_TYPE_SIZE'
  719.      A C expression for the size in bits of the type `short' on the
  720.      target machine.  If you don't define this, the default is half a
  721.      word.  (If this would be less than one storage unit, it is rounded
  722.      up to one unit.)
  723.  
  724. `LONG_TYPE_SIZE'
  725.      A C expression for the size in bits of the type `long' on the
  726.      target machine.  If you don't define this, the default is one word.
  727.  
  728. `LONG_LONG_TYPE_SIZE'
  729.      A C expression for the size in bits of the type `long long' on the
  730.      target machine.  If you don't define this, the default is two
  731.      words.
  732.  
  733. `CHAR_TYPE_SIZE'
  734.      A C expression for the size in bits of the type `char' on the
  735.      target machine.  If you don't define this, the default is one
  736.      quarter of a word.  (If this would be less than one storage unit,
  737.      it is rounded up to one unit.)
  738.  
  739. `FLOAT_TYPE_SIZE'
  740.      A C expression for the size in bits of the type `float' on the
  741.      target machine.  If you don't define this, the default is one word.
  742.  
  743. `DOUBLE_TYPE_SIZE'
  744.      A C expression for the size in bits of the type `double' on the
  745.      target machine.  If you don't define this, the default is two
  746.      words.
  747.  
  748. `LONG_DOUBLE_TYPE_SIZE'
  749.      A C expression for the size in bits of the type `long double' on
  750.      the target machine.  If you don't define this, the default is two
  751.      words.
  752.  
  753. `DEFAULT_SIGNED_CHAR'
  754.      An expression whose value is 1 or 0, according to whether the type
  755.      `char' should be signed or unsigned by default.  The user can
  756.      always override this default with the options `-fsigned-char' and
  757.      `-funsigned-char'.
  758.  
  759. `DEFAULT_SHORT_ENUMS'
  760.      A C expression to determine whether to give an `enum' type only as
  761.      many bytes as it takes to represent the range of possible values
  762.      of that type.  A nonzero value means to do that; a zero value
  763.      means all `enum' types should be allocated like `int'.
  764.  
  765.      If you don't define the macro, the default is 0.
  766.  
  767. `SIZE_TYPE'
  768.      A C expression for a string describing the name of the data type
  769.      to use for size values.  The typedef name `size_t' is defined
  770.      using the contents of the string.
  771.  
  772.      The string can contain more than one keyword.  If so, separate
  773.      them with spaces, and write first any length keyword, then
  774.      `unsigned' if appropriate, and finally `int'.  The string must
  775.      exactly match one of the data type names defined in the function
  776.      `init_decl_processing' in the file `c-decl.c'.  You may not omit
  777.      `int' or change the order--that would cause the compiler to crash
  778.      on startup.
  779.  
  780.      If you don't define this macro, the default is `"long unsigned
  781.      int"'.
  782.  
  783. `PTRDIFF_TYPE'
  784.      A C expression for a string describing the name of the data type
  785.      to use for the result of subtracting two pointers.  The typedef
  786.      name `ptrdiff_t' is defined using the contents of the string.  See
  787.      `SIZE_TYPE' above for more information.
  788.  
  789.      If you don't define this macro, the default is `"long int"'.
  790.  
  791. `WCHAR_TYPE'
  792.      A C expression for a string describing the name of the data type
  793.      to use for wide characters.  The typedef name `wchar_t' is defined
  794.      using the contents of the string.  See `SIZE_TYPE' above for more
  795.      information.
  796.  
  797.      If you don't define this macro, the default is `"int"'.
  798.  
  799. `WCHAR_TYPE_SIZE'
  800.      A C expression for the size in bits of the data type for wide
  801.      characters.  This is used in `cpp', which cannot make use of
  802.      `WCHAR_TYPE'.
  803.  
  804. `OBJC_INT_SELECTORS'
  805.      Define this macro if the type of Objective C selectors should be
  806.      `int'.
  807.  
  808.      If this macro is not defined, then selectors should have the type
  809.      `struct objc_selector *'.
  810.  
  811. `OBJC_SELECTORS_WITHOUT_LABELS'
  812.      Define this macro if the compiler can group all the selectors
  813.      together into a vector and use just one label at the beginning of
  814.      the vector.  Otherwise, the compiler must give each selector its
  815.      own assembler label.
  816.  
  817.      On certain machines, it is important to have a separate label for
  818.      each selector because this enables the linker to eliminate
  819.      duplicate selectors.
  820.  
  821. `TARGET_BELL'
  822.      A C constant expression for the integer value for escape sequence
  823.      `\a'.
  824.  
  825. `TARGET_BS'
  826. `TARGET_TAB'
  827. `TARGET_NEWLINE'
  828.      C constant expressions for the integer values for escape sequences
  829.      `\b', `\t' and `\n'.
  830.  
  831. `TARGET_VT'
  832. `TARGET_FF'
  833. `TARGET_CR'
  834.      C constant expressions for the integer values for escape sequences
  835.      `\v', `\f' and `\r'.
  836.  
  837. File: gcc.info,  Node: Registers,  Next: Register Classes,  Prev: Type Layout,  Up: Target Macros
  838.  
  839. Register Usage
  840. ==============
  841.  
  842.    This section explains how to describe what registers the target
  843. machine has, and how (in general) they can be used.
  844.  
  845.    The description of which registers a specific instruction can use is
  846. done with register classes; see *Note Register Classes::.  For
  847. information on using registers to access a stack frame, see *Note Frame
  848. Registers::.  For passing values in registers, see *Note Register
  849. Arguments::.  For returning values in registers, see *Note Scalar
  850. Return::.
  851.  
  852. * Menu:
  853.  
  854. * Register Basics::        Number and kinds of registers.
  855. * Allocation Order::        Order in which registers are allocated.
  856. * Values in Registers::        What kinds of values each reg can hold.
  857. * Leaf Functions::        Renumbering registers for leaf functions.
  858. * Stack Registers::        Handling a register stack such as 80387.
  859. * Obsolete Register Macros::    Macros formerly used for the 80387.
  860.  
  861. File: gcc.info,  Node: Register Basics,  Next: Allocation Order,  Up: Registers
  862.  
  863. Basic Characteristics of Registers
  864. ----------------------------------
  865.  
  866. `FIRST_PSEUDO_REGISTER'
  867.      Number of hardware registers known to the compiler.  They receive
  868.      numbers 0 through `FIRST_PSEUDO_REGISTER-1'; thus, the first
  869.      pseudo register's number really is assigned the number
  870.      `FIRST_PSEUDO_REGISTER'.
  871.  
  872. `FIXED_REGISTERS'
  873.      An initializer that says which registers are used for fixed
  874.      purposes all throughout the compiled code and are therefore not
  875.      available for general allocation.  These would include the stack
  876.      pointer, the frame pointer (except on machines where that can be
  877.      used as a general register when no frame pointer is needed), the
  878.      program counter on machines where that is considered one of the
  879.      addressable registers, and any other numbered register with a
  880.      standard use.
  881.  
  882.      This information is expressed as a sequence of numbers, separated
  883.      by commas and surrounded by braces.  The Nth number is 1 if
  884.      register N is fixed, 0 otherwise.
  885.  
  886.      The table initialized from this macro, and the table initialized by
  887.      the following one, may be overridden at run time either
  888.      automatically, by the actions of the macro
  889.      `CONDITIONAL_REGISTER_USAGE', or by the user with the command
  890.      options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'.
  891.  
  892. `CALL_USED_REGISTERS'
  893.      Like `FIXED_REGISTERS' but has 1 for each register that is
  894.      clobbered (in general) by function calls as well as for fixed
  895.      registers.  This macro therefore identifies the registers that are
  896.      not available for general allocation of values that must live
  897.      across function calls.
  898.  
  899.      If a register has 0 in `CALL_USED_REGISTERS', the compiler
  900.      automatically saves it on function entry and restores it on
  901.      function exit, if the register is used within the function.
  902.  
  903. `CONDITIONAL_REGISTER_USAGE'
  904.      Zero or more C statements that may conditionally modify two
  905.      variables `fixed_regs' and `call_used_regs' (both of type `char
  906.      []') after they have been initialized from the two preceding
  907.      macros.
  908.  
  909.      This is necessary in case the fixed or call-clobbered registers
  910.      depend on target flags.
  911.  
  912.      You need not define this macro if it has no work to do.
  913.  
  914.      If the usage of an entire class of registers depends on the target
  915.      flags, you may indicate this to GCC by using this macro to modify
  916.      `fixed_regs' and `call_used_regs' to 1 for each of the registers
  917.      in the classes which should not be used by GCC.  Also define the
  918.      macro `REG_CLASS_FROM_LETTER' to return `NO_REGS' if it is called
  919.      with a letter for a class that shouldn't be used.
  920.  
  921.      (However, if this class is not included in `GENERAL_REGS' and all
  922.      of the insn patterns whose constraints permit this class are
  923.      controlled by target switches, then GCC will automatically avoid
  924.      using these registers when the target switches are opposed to
  925.      them.)
  926.  
  927. `NON_SAVING_SETJMP'
  928.      If this macro is defined and has a nonzero value, it means that
  929.      `setjmp' and related functions fail to save the registers, or that
  930.      `longjmp' fails to restore them.  To compensate, the compiler
  931.      avoids putting variables in registers in functions that use
  932.      `setjmp'.
  933.  
  934. `INCOMING_REGNO (OUT)'
  935.      Define this macro if the target machine has register windows.
  936.      This C expression returns the register number as seen by the
  937.      called function corresponding to the register number OUT as seen
  938.      by the calling function.  Return OUT if register number OUT is not
  939.      an outbound register.
  940.  
  941. `OUTGOING_REGNO (IN)'
  942.      Define this macro if the target machine has register windows.
  943.      This C expression returns the register number as seen by the
  944.      calling function corresponding to the register number IN as seen
  945.      by the called function.  Return IN if register number IN is not an
  946.      inbound register.
  947.  
  948. File: gcc.info,  Node: Allocation Order,  Next: Values in Registers,  Prev: Register Basics,  Up: Registers
  949.  
  950. Order of Allocation of Registers
  951. --------------------------------
  952.  
  953. `REG_ALLOC_ORDER'
  954.      If defined, an initializer for a vector of integers, containing the
  955.      numbers of hard registers in the order in which GNU CC should
  956.      prefer to use them (from most preferred to least).
  957.  
  958.      If this macro is not defined, registers are used lowest numbered
  959.      first (all else being equal).
  960.  
  961.      One use of this macro is on machines where the highest numbered
  962.      registers must always be saved and the save-multiple-registers
  963.      instruction supports only sequences of consecutive registers.  On
  964.      such machines, define `REG_ALLOC_ORDER' to be an initializer that
  965.      lists the highest numbered allocatable register first.
  966.  
  967. `ORDER_REGS_FOR_LOCAL_ALLOC'
  968.      A C statement (sans semicolon) to choose the order in which to
  969.      allocate hard registers for pseudo-registers local to a basic
  970.      block.
  971.  
  972.      Store the desired register order in the array `reg_alloc_order'.
  973.      Element 0 should be the register to allocate first; element 1, the
  974.      next register; and so on.
  975.  
  976.      The macro body should not assume anything about the contents of
  977.      `reg_alloc_order' before execution of the macro.
  978.  
  979.      On most machines, it is not necessary to define this macro.
  980.  
  981. File: gcc.info,  Node: Values in Registers,  Next: Leaf Functions,  Prev: Allocation Order,  Up: Registers
  982.  
  983. How Values Fit in Registers
  984. ---------------------------
  985.  
  986.    This section discusses the macros that describe which kinds of values
  987. (specifically, which machine modes) each register can hold, and how many
  988. consecutive registers are needed for a given mode.
  989.  
  990. `HARD_REGNO_NREGS (REGNO, MODE)'
  991.      A C expression for the number of consecutive hard registers,
  992.      starting at register number REGNO, required to hold a value of mode
  993.      MODE.
  994.  
  995.      On a machine where all registers are exactly one word, a suitable
  996.      definition of this macro is
  997.  
  998.           #define HARD_REGNO_NREGS(REGNO, MODE)            \
  999.              ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1)  \
  1000.               / UNITS_PER_WORD))
  1001.  
  1002. `HARD_REGNO_MODE_OK (REGNO, MODE)'
  1003.      A C expression that is nonzero if it is permissible to store a
  1004.      value of mode MODE in hard register number REGNO (or in several
  1005.      registers starting with that one).  For a machine where all
  1006.      registers are equivalent, a suitable definition is
  1007.  
  1008.           #define HARD_REGNO_MODE_OK(REGNO, MODE) 1
  1009.  
  1010.      It is not necessary for this macro to check for the numbers of
  1011.      fixed registers, because the allocation mechanism considers them
  1012.      to be always occupied.
  1013.  
  1014.      On some machines, double-precision values must be kept in even/odd
  1015.      register pairs.  The way to implement that is to define this macro
  1016.      to reject odd register numbers for such modes.
  1017.  
  1018.      The minimum requirement for a mode to be OK in a register is that
  1019.      the `movMODE' instruction pattern support moves between the
  1020.      register and any other hard register for which the mode is OK; and
  1021.      that moving a value into the register and back out not alter it.
  1022.  
  1023.      Since the same instruction used to move `SImode' will work for all
  1024.      narrower integer modes, it is not necessary on any machine for
  1025.      `HARD_REGNO_MODE_OK' to distinguish between these modes, provided
  1026.      you define patterns `movhi', etc., to take advantage of this.  This
  1027.      is useful because of the interaction between `HARD_REGNO_MODE_OK'
  1028.      and `MODES_TIEABLE_P'; it is very desirable for all integer modes
  1029.      to be tieable.
  1030.  
  1031.      Many machines have special registers for floating point arithmetic.
  1032.      Often people assume that floating point machine modes are allowed
  1033.      only in floating point registers.  This is not true.  Any
  1034.      registers that can hold integers can safely *hold* a floating
  1035.      point machine mode, whether or not floating arithmetic can be done
  1036.      on it in those registers.  Integer move instructions can be used
  1037.      to move the values.
  1038.  
  1039.      On some machines, though, the converse is true: fixed-point machine
  1040.      modes may not go in floating registers.  This is true if the
  1041.      floating registers normalize any value stored in them, because
  1042.      storing a non-floating value there would garble it.  In this case,
  1043.      `HARD_REGNO_MODE_OK' should reject fixed-point machine modes in
  1044.      floating registers.  But if the floating registers do not
  1045.      automatically normalize, if you can store any bit pattern in one
  1046.      and retrieve it unchanged without a trap, then any machine mode
  1047.      may go in a floating register, so you can define this macro to say
  1048.      so.
  1049.  
  1050.      On some machines, such as the Sparc and the Mips, we get better
  1051.      code by defining `HARD_REGNO_MODE_OK' to forbid integers in
  1052.      floating registers, even though the hardware is capable of
  1053.      handling them.  This is because transferring values between
  1054.      floating registers and general registers is so slow that it is
  1055.      better to keep the integer in memory.
  1056.  
  1057.      The primary significance of special floating registers is rather
  1058.      that they are the registers acceptable in floating point arithmetic
  1059.      instructions.  However, this is of no concern to
  1060.      `HARD_REGNO_MODE_OK'.  You handle it by writing the proper
  1061.      constraints for those instructions.
  1062.  
  1063.      On some machines, the floating registers are especially slow to
  1064.      access, so that it is better to store a value in a stack frame
  1065.      than in such a register if floating point arithmetic is not being
  1066.      done.  As long as the floating registers are not in class
  1067.      `GENERAL_REGS', they will not be used unless some pattern's
  1068.      constraint asks for one.
  1069.  
  1070. `MODES_TIEABLE_P (MODE1, MODE2)'
  1071.      A C expression that is nonzero if it is desirable to choose
  1072.      register allocation so as to avoid move instructions between a
  1073.      value of mode MODE1 and a value of mode MODE2.
  1074.  
  1075.      If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R,
  1076.      MODE2)' are ever different for any R, then `MODES_TIEABLE_P (MODE1,
  1077.      MODE2)' must be zero.
  1078.  
  1079. File: gcc.info,  Node: Leaf Functions,  Next: Stack Registers,  Prev: Values in Registers,  Up: Registers
  1080.  
  1081. Handling Leaf Functions
  1082. -----------------------
  1083.  
  1084.    On some machines, a leaf function (i.e., one which makes no calls)
  1085. can run more efficiently if it does not make its own register window.
  1086. Often this means it is required to receive its arguments in the
  1087. registers where they are passed by the caller, instead of the registers
  1088. where they would normally arrive.
  1089.  
  1090.    The special treatment for leaf functions generally applies only when
  1091. other conditions are met; for example, often they may use only those
  1092. registers for its own variables and temporaries.  We use the term "leaf
  1093. function" to mean a function that is suitable for this special
  1094. handling, so that functions with no calls are not necessarily "leaf
  1095. functions".
  1096.  
  1097.    GNU CC assigns register numbers before it knows whether the function
  1098. is suitable for leaf function treatment.  So it needs to renumber the
  1099. registers in order to output a leaf function.  The following macros
  1100. accomplish this.
  1101.  
  1102. `LEAF_REGISTERS'
  1103.      A C initializer for a vector, indexed by hard register number,
  1104.      which contains 1 for a register that is allowable in a candidate
  1105.      for leaf function treatment.
  1106.  
  1107.      If leaf function treatment involves renumbering the registers,
  1108.      then the registers marked here should be the ones before
  1109.      renumbering--those that GNU CC would ordinarily allocate.  The
  1110.      registers which will actually be used in the assembler code, after
  1111.      renumbering, should not be marked with 1 in this vector.
  1112.  
  1113.      Define this macro only if the target machine offers a way to
  1114.      optimize the treatment of leaf functions.
  1115.  
  1116. `LEAF_REG_REMAP (REGNO)'
  1117.      A C expression whose value is the register number to which REGNO
  1118.      should be renumbered, when a function is treated as a leaf
  1119.      function.
  1120.  
  1121.      If REGNO is a register number which should not appear in a leaf
  1122.      function before renumbering, then the expression should yield -1,
  1123.      which will cause the compiler to abort.
  1124.  
  1125.      Define this macro only if the target machine offers a way to
  1126.      optimize the treatment of leaf functions, and registers need to be
  1127.      renumbered to do this.
  1128.  
  1129. `REG_LEAF_ALLOC_ORDER'
  1130.      If defined, an initializer for a vector of integers, containing the
  1131.      numbers of hard registers in the order in which the GNU CC should
  1132.      prefer to use them (from most preferred to least) in a leaf
  1133.      function.  If this macro is not defined, REG_ALLOC_ORDER is used
  1134.      for both non-leaf and leaf-functions.
  1135.  
  1136.    Normally, `FUNCTION_PROLOGUE' and `FUNCTION_EPILOGUE' must treat
  1137. leaf functions specially.  It can test the C variable `leaf_function'
  1138. which is nonzero for leaf functions.  (The variable `leaf_function' is
  1139. defined only if `LEAF_REGISTERS' is defined.)
  1140.  
  1141. File: gcc.info,  Node: Stack Registers,  Next: Obsolete Register Macros,  Prev: Leaf Functions,  Up: Registers
  1142.  
  1143. Registers That Form a Stack
  1144. ---------------------------
  1145.  
  1146.    There are special features to handle computers where some of the
  1147. "registers" form a stack, as in the 80387 coprocessor for the 80386.
  1148. Stack registers are normally written by pushing onto the stack, and are
  1149. numbered relative to the top of the stack.
  1150.  
  1151.    Currently, GNU CC can only handle one group of stack-like registers,
  1152. and they must be consecutively numbered.
  1153.  
  1154. `STACK_REGS'
  1155.      Define this if the machine has any stack-like registers.
  1156.  
  1157. `FIRST_STACK_REG'
  1158.      The number of the first stack-like register.  This one is the top
  1159.      of the stack.
  1160.  
  1161. `LAST_STACK_REG'
  1162.      The number of the last stack-like register.  This one is the
  1163.      bottom of the stack.
  1164.  
  1165. ə